<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/docs.css" type="text/css" rel="stylesheet" />
<link href="../css/prettify.css" type="text/css" rel="stylesheet" />
<script src="../js/prettify.js" type="text/javascript"></script>
</head>
<body onLoad="prettyPrint()">
<div class="g-unit" id="doc-content">
<div id="api-info-block">
<div class="api-level">H3C CAS云管理平台</div>
</div>
<div id="jd-header">
<h1>租户登录</h1>
</div>
<div id="jd-content">
<div class="jd-descr">
<p>租户登录身份认证。</p>
<h2><a name="uri"></a>接口 URI</h2>
<p>/cas/casrs/user/auth/{loginName}/{password}</p>
<h2><a name="access"></a>访问方法</h2>
<dl>
  <dt><b>HTTP 方法</b></dt>
  <dd>GET</dd>
  <dt><b>参数</b></dt>
  <table id="pubmethods" class="jd-sumtable">
    <tbody>
      <tr>
        <th colspan="2">路径参数（Path Parameter）</th>
      </tr>
      <tr>
        <td class="jd-typecol">loginName</td>
        <td width="100%" class="jd-linkcol"><span class="sympad">登录名。</span>
            <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
      <tr class="alt-color">
        <td class="jd-typecol">password</td>
        <td class="jd-linkcol"><span class="sympad">登录密码。</span><span class="sympad">密码</span>需经过MD5加密，然后再进行BASE64编码。
            <div class="jd-descrdiv">字符串（String）类型。</div></td>
      </tr>
  </table>
</dl>
<h2><a name="result"></a>返回结果</h2>
<dl>
  <dt><b>状态码</b></dt>
  <dd>
  <ul>
    <li>204(No Content)：成功。</li>
  </ul>
  <ul>
    <li>409(Conflict)：失败</li>
  </ul>
  </dd>
  <dt><b>消息头</b></dt>
  <div class="source"><pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Server: Apache-Coyote/1.1<br>Content-Type: application/xml<br>Content-Length: 194<br>Date: Mon, 21 May 2012 12:33:30 GMT</pre>
  </div>
  <dt><b>消息体</b></dt>
  <div class="source"><pre class="prettyprint lang-xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;user&gt;<br>  &lt;id&gt;6&lt;/id&gt;<br>  &lt;loginName&gt;zxk&lt;/loginName&gt;<br>  &lt;userName&gt;zxk&lt;/userName&gt;<br>  &lt;authType&gt;0&lt;/authType&gt;<br>  &lt;userGroupId&gt;2&lt;/userGroupId&gt;<br>  &lt;orgId&gt;1&lt;/orgId&gt;<br>&lt;/user&gt;<br></pre>
  
  </div>
</dl>
<dt><a name="detail"></a><b>元素含义</b></dt>
<table class="jd-sumtable" id="pubmethods">
  <tbody>
    <tr>
      <th colspan="2"><span class="prettyprint lang-xml">user</span>各子元素</th>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">id</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">用户ID。</span>
          <div class="jd-descrdiv">长整数（long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">loginName</span></td>
      <td class="jd-linkcol"><span class="sympad">租户登录名。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">userName</span></td>
      <td class="jd-linkcol"><span class="sympad">租户姓名。</span>
          <div class="jd-descrdiv">字符串（String）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">orgId</span></td>
      <td class="jd-linkcol"><span class="sympad">所属的组织ID。</span>
          <div class="jd-descrdiv">长整数（long）类型。</div></td>
    </tr>
    
    <tr>
      <td class="jd-typecol"><span class="prettyprint lang-xml">userGroupId</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">所属用户分组ID。</span>
          <div class="jd-descrdiv">长整数（long）类型。</div></td>
    </tr>
    <tr class="alt-color">
      <td class="jd-typecol"><span class="prettyprint lang-xml">authType</span></td>
      <td class="jd-linkcol" width="100%"><span class="sympad">认证方式。</span>
          0：简单密码认证，1：LDAP认证
            <div class="jd-descrdiv">整数（int）类型。</div></td>
    </tr>
</table>
  </div>
</dl>
<h2><a name="example"></a>应用举例</h2>
<p>对登录名为&quot;zxk&quot;，原始密码为“admin”的租户进行认证<span class="prettyprint lang-xml"></span>。</p>
<dl>
  <dt><b>请求</b></dt>
  <div class="source">
    <pre class="prettyprint lang-xml">DELETE http://192.168.0.4:8080//cas/casrs/user/auth/zxk/WpIxDAPVsRM=
accept: application/xml
...
        </pre>
  </div>
  <dt><b>回应</b></dt>
  <div class="source"><pre class="prettyprint lang-xml">HTTP/1.1 200 OK<br>Server: Apache-Coyote/1.1<br>Content-Type: application/xml<br>Content-Length: 194<br>Date: Mon, 21 May 2012 12:33:30 GMT<br>&lt;user&gt;<br>  &lt;id&gt;6&lt;/id&gt;<br>  &lt;loginName&gt;zxk&lt;/loginName&gt;<br>  &lt;userName&gt;zxk&lt;/userName&gt;<br>  &lt;authType&gt;0&lt;/authType&gt;<br>  &lt;userGroupId&gt;2&lt;/userGroupId&gt;<br>  &lt;orgId&gt;1&lt;/orgId&gt;<br>&lt;/user&gt;<br></pre>
  </div>
</dl>

</div>
</div>
</div>
</body>
</html>